home *** CD-ROM | disk | FTP | other *** search
- global gCorpDemo, gPickerPath, gCorpDemoList, gLastDemo, gColorDepth, gCorpVolume, gLivBookButs, gBroderbundButs, gMenuButs, gControlButs, gNavigator, gDemoInfo, gPrintInfo, gDialog, gReturnFrame, gSupplierButs, gBackBut, gMusicPlayer, gKeyboardExit
-
- on startMovie
- setPaletteCast()
- if voidp(gCorpDemo) then
- setMonitorDepth("start")
- set gCorpVolume to the soundLevel
- if the soundLevel = 0 then
- set the soundLevel to 1
- end if
- initCorporateGlobals()
- else
- cleanup()
- end if
- set gKeyboardExit to 0
- set the exitLock to 1
- set gLivBookButs to new(script "buttonMan", [10, 11, 12, 13, 14, 15], ["JGMicon", "THicon", "SRBicon", "LMSicon", "HHHicon", "ABicon"])
- setType(gLivBookButs, "radio")
- setDownList(gLivBookButs, ["JGMiconD", "THiconD", "SRBiconD", "LMSiconD", "HHHiconD", "ABiconD"])
- setOverList(gLivBookButs, ["JGMiconR", "THiconR", "SRBiconR", "LMSiconR", "HHHiconR", "ABiconR"])
- setSound(gLivBookButs, "downSound2")
- set gBroderbundButs to new(script "ButtonMan", [10, 11, 12, 13, 14, 15, 16], ["kidpixIcon", "zoombiniIcon", "mathsIcon", "carmenJIcon", "printshopIcon", "carmenIcon", "clickArtIcon"])
- setType(gBroderbundButs, "radio")
- setDownList(gBroderbundButs, ["kidpixIconD", "zoombiniIconD", "mathsIconD", "carmenJIconD", "printshopIconD", "carmenIconD", "clickArtIconD"])
- setOverList(gBroderbundButs, ["kidpixIconR", "zoombiniIconR", "mathsIconR", "carmenJIconR", "printshopIconR", "carmenIconR", "clickArtIconR"])
- setSound(gBroderbundButs, "downSound2")
- set gSupplierButs to new(script "buttonMan", [10, 11, 12, 13], ["RMicon", "SCETicon", "TAGicon", "XemplarIcon"])
- setType(gSupplierButs, "normal")
- setDownList(gSupplierButs, ["RMiconD", "SCETiconD", "TAGiconD", "XemplarIconD"])
- setOverList(gSupplierButs, ["RMiconR", "SCETiconR", "TAGiconR", "XemplarIconR"])
- setSound(gSupplierButs, "downSound2")
- set gBackBut to new(script "buttonMan", [10], ["backIcon"])
- setType(gBackBut, "normal")
- setDownList(gBackBut, ["backIconD"])
- setOverList(gBackBut, ["backIconR"])
- setSound(gBackBut, "downSound2")
- set gControlButs to new(script "buttonMan", [6, 7, 8], ["exitIcon", "printIcon", "demoIcon"])
- setType(gControlButs, "normal")
- setDownList(gControlButs, ["exitIconD", "printIconD", "demoIconD"])
- setOverList(gControlButs, ["exitIconR", "printIconR", "demoIconR"])
- setGreyList(gControlButs, ["exitIconG", "printIconG", "demoIconG"])
- if the machineType = 256 then
- setSound(gControlButs, "downSound1")
- else
- setSound(gControlButs, "downSound1", "upSound1")
- end if
- set gMenuButs to new(script "buttonMan", [2, 3, 4, 5], ["sideIcon1", "sideIcon2", "sideIcon3", "sideIcon4"])
- setType(gMenuButs, "radio")
- setDownList(gMenuButs, ["sideIcon1D", "sideIcon2D", "sideIcon3D", "sideIcon4D"])
- setOverList(gMenuButs, ["sideIcon1R", "sideIcon2R", "sideIcon3R", "sideIcon4R"])
- setSound(gMenuButs, "downSound3")
- set gNavigator to new(script "NavigationMgr")
- addMarker(gNavigator, "Welcome", [gMenuButs, gControlButs], [0, 0])
- addMarker(gNavigator, "LivingBooks", [gMenuButs, gLivBookButs, gControlButs], [1, 0, 0])
- addMarker(gNavigator, "Grandma", [gMenuButs, gLivBookButs, gControlButs], [1, 1, 0])
- addMarker(gNavigator, "Tortoise", [gMenuButs, gLivBookButs, gControlButs], [1, 2, 0])
- addMarker(gNavigator, "SheilaRae", [gMenuButs, gLivBookButs, gControlButs], [1, 3, 0])
- addMarker(gNavigator, "LittleMonster", [gMenuButs, gLivBookButs, gControlButs], [1, 4, 0])
- addMarker(gNavigator, "Harry", [gMenuButs, gLivBookButs, gControlButs], [1, 5, 0])
- addMarker(gNavigator, "Birthday", [gMenuButs, gLivBookButs, gControlButs], [1, 6, 0])
- addMarker(gNavigator, "Broderbund", [gMenuButs, gBroderbundButs, gControlButs], [2, 0, 0])
- addMarker(gNavigator, "MathWorkshop", [gMenuButs, gBroderbundButs, gControlButs], [2, 3, 0])
- addMarker(gNavigator, "Zoombinis", [gMenuButs, gBroderbundButs, gControlButs], [2, 2, 0])
- addMarker(gNavigator, "KidPix", [gMenuButs, gBroderbundButs, gControlButs], [2, 1, 0])
- addMarker(gNavigator, "CarmenWorld", [gMenuButs, gBroderbundButs, gControlButs], [2, 6, 0])
- addMarker(gNavigator, "CarmenJunior", [gMenuButs, gBroderbundButs, gControlButs], [2, 4, 0])
- addMarker(gNavigator, "PrintShop", [gMenuButs, gBroderbundButs, gControlButs], [2, 5, 0])
- addMarker(gNavigator, "ClickArt", [gMenuButs, gBroderbundButs, gControlButs], [2, 7, 0])
- addMarker(gNavigator, "WorkSheet", [gMenuButs, gControlButs], [3, 0])
- addMarker(gNavigator, "OrderInfo", [gMenuButs, gControlButs, gSupplierButs], [4, 0, 0])
- addMarker(gNavigator, "RM", [gMenuButs, gControlButs, gBackBut], [4, 0, 0])
- addMarker(gNavigator, "SCET", [gMenuButs, gControlButs, gBackBut], [4, 0, 0])
- addMarker(gNavigator, "TAG", [gMenuButs, gControlButs, gBackBut], [4, 0, 0])
- addMarker(gNavigator, "Xemplar", [gMenuButs, gControlButs, gBackBut], [4, 0, 0])
- addMarker(gNavigator, "Credits", [gMenuButs, gControlButs], [0, 0])
- addMarker(gNavigator, "quit", [])
- set fd to fileDelimiter()
- set gDemoInfo to new(script "demoMgr")
- addDemo(gDemoInfo, "Zoombinis", the pathName & "Zoombini" & fd & "pizza" & fd & "zoom", "movie")
- addDemo(gDemoInfo, "CarmenWorld", the pathName & "Carmen" & fd & "_CARMWLD", "movie")
- addDemo(gDemoInfo, "CarmenJunior", the pathName & "CarmenJR" & fd & "CarmenJR", "movie")
- addDemo(gDemoInfo, "MathWorkshop", the pathName & "mathwork" & fd & "mathwork", "movie")
- addDemo(gDemoInfo, "KidPix", the pathName & "kid_pix" & fd & "moopies" & fd & "kid_pix", "movie")
- addDemo(gDemoInfo, "Grandma", the pathName & "JGM" & fd & "JMCOVERB", "movie")
- addDemo(gDemoInfo, "Harry", the pathName & "HHH" & fd & "HHCOVERB", "movie")
- addDemo(gDemoInfo, "Birthday", the pathName & "AB" & fd & "ABCOVERB", "movie")
- addDemo(gDemoInfo, "LittleMonster", the pathName & "LMAS" & fd & "LMCOVERB", "movie")
- addDemo(gDemoInfo, "Tortoise", the pathName & "TTAH" & fd & "THCOVERB", "movie")
- addDemo(gDemoInfo, "SheilaRae", the pathName & "SRAE" & fd & "SRCOVERB", "movie")
- set gPrintInfo to new(script "printMgr")
- addPrintSection(gPrintInfo, "Grandma", "product", ["LBPrintTitle", "JGMPrint"])
- addPrintSection(gPrintInfo, "Tortoise", "product", ["LBPrintTitle", "TTHPrint"])
- addPrintSection(gPrintInfo, "SheilaRae", "product", ["LBPrintTitle", "SRBPrint"])
- addPrintSection(gPrintInfo, "LittleMonster", "product", ["LBPrintTitle", "LMSPrint"])
- addPrintSection(gPrintInfo, "Harry", "product", ["LBPrintTitle", "HHHPrint"])
- addPrintSection(gPrintInfo, "Birthday", "product", ["LBPrintTitle", "ABPrint"])
- addPrintSection(gPrintInfo, "MathWorkshop", "product", ["BrodPrintTitle", "MWPrint"])
- addPrintSection(gPrintInfo, "Zoombinis", "product", ["BrodPrintTitle", "ZPrint"])
- addPrintSection(gPrintInfo, "CarmenWorld", "product", ["BrodPrintTitle", "CWPrint"])
- addPrintSection(gPrintInfo, "CarmenJunior", "product", ["BrodPrintTitle", "CJPrint"])
- addPrintSection(gPrintInfo, "PrintShop", "product", ["BrodPrintTitle", "PSPrint"])
- addPrintSection(gPrintInfo, "ClickArt", "product", ["BrodPrintTitle", "CAPrint"])
- addPrintSection(gPrintInfo, "KidPix", "product", ["BrodPrintTitle", "KPPrint"])
- addPrintSection(gPrintInfo, "TAG", "OrderForm", ["OFPrintTitle", "orderFormPrint"])
- set gDialog to new(script "dialogMgr")
- setProperties(gDialog, "quit", "dQuit", ["goQuit", "nothing"])
- setProperties(gDialog, "product", "dPrintP", ["printInfo", "nothing"])
- setProperties(gDialog, "WorkSheet", "dPrintW", ["printInfo", "nothing"])
- setProperties(gDialog, "OrderForm", "dPrintOF", ["printInfo", "nothing"])
- set gMusicPlayer to new(script "musicMgr", 3, 40, ["CJR", "KPX", "MWS1", "MWS2", "ZMB", "CWD", "PSP"])
- if the freeBlock > (2 * 1024 * 1024) then
- setState(gMusicPlayer, 1)
- end if
- end
-
- on keyDown
- checkKeyboardExit()
- end
-
- on checkKeyboardExit
- if not gKeyboardExit then
- exit
- end if
- set QuitMe to 0
- if the keyCode = 53 then
- set QuitMe to 1
- end if
- if the commandDown and ((the key = ".") or (the key = "q")) then
- set QuitMe to 1
- end if
- if QuitMe = 1 then
- openDialog("quit")
- end if
- end
-
- on fileDelimiter
- if the platform contains "Windows" then
- return "\"
- else
- return ":"
- end if
- end
-
- on setPaletteCast
- if the platform contains "Windows" then
- set the fileName of castLib "Palettes" to the pathName & "PCPal"
- else
- set the fileName of castLib "Palettes" to the pathName & "MacPal"
- end if
- end
-
- on setMonitorDepth theState
- if theState = "start" then
- if the colorDepth <> 8 then
- if the platform contains "Windows" then
- alert(the text of member "MonitorAlertWin")
- quit()
- else
- alert(the text of member "MonitorAlertMac")
- set gColorDepth to the colorDepth
- set the colorDepth to 8
- end if
- end if
- else
- if the platform contains "Macintosh" then
- if gColorDepth <> EMPTY then
- set the colorDepth to gColorDepth
- end if
- end if
- end if
- end
-
- on checkQuickTime
- if not (the quickTimePresent) then
- alert(the text of member "QuickTimeAlert")
- quit()
- end if
- end
-
- on goQuit
- set gKeyboardExit to 0
- set the actorList to []
- goMarker(gNavigator, "quit")
- end
-
- on printInfo
- printInfo(gPrintInfo, getMarker(gNavigator))
- end
-
- on openDialog theName
- set theObjectList to getObjectList(gNavigator)
- repeat with r in theObjectList
- set index to getOne(the actorList, r)
- if index > 0 then
- deleteAt(the actorList, index)
- end if
- end repeat
- set the mouseDownScript to "closeDialog"
- set the mouseUpScript to "dontPassEvent"
- show(gDialog, theName)
- end
-
- on closeDialog
- if the doubleClick then
- exit
- end if
- dispose(gDialog)
- set theObjectList to getObjectList(gNavigator)
- repeat with r in theObjectList
- set index to getOne(the actorList, r)
- if index = 0 then
- append(the actorList, r)
- end if
- end repeat
- set the mouseDownScript to EMPTY
- set the mouseUpScript to EMPTY
- end
-
- on initCorporateGlobals
- set gCorpDemo to "PICKER DemoNone"
- set gPickerPath to the pathName & the movieName
- if voidp(gLastDemo) then
- set gLastDemo to EMPTY
- end if
- if voidp(gColorDepth) then
- set gColorDepth to EMPTY
- end if
- if voidp(gCorpVolume) then
- set gCorpVolume to 1
- end if
- if voidp(gReturnFrame) then
- set gReturnFrame to EMPTY
- end if
- end
-
- on timedEvent Howlong, theAction
- set gTimer to EMPTY
- set gTimer to new(script "timerObj", Howlong, theAction)
- end
-
- on fadeOutAllSounds
- sound fadeOut 1, 60
- sound fadeOut 2, 60
- sound fadeOut 3, 60
- sound fadeOut 4, 60
- end
-
- on StartDemo
- set demoName to getMarker(gNavigator)
- set demoPath to demoPath(gDemoInfo, demoName)
- set gReturnFrame to demoName
- cleanup()
- go("goToDemo")
- go(1, demoPath)
- end
-
- on returnFromDemo
- setMarker(gNavigator, EMPTY)
- goMarker(gNavigator, gReturnFrame)
- set gKeyboardExit to 1
- end
-
- on cleanup
- set the actorList to []
- puppetSound(1, 0)
- puppetSound(2, 0)
- puppetSound(3, 0)
- puppetSound(4, 0)
- set the timeoutScript to EMPTY
- set the timeoutLength to 0
- set the timeoutLapsed to 0
- set the timeoutKeyDown to 1
- set the timeoutMouse to 1
- set the timeoutPlay to 0
- set the mouseDownScript to EMPTY
- set the mouseUpScript to EMPTY
- set the keyDownScript to EMPTY
- set the keyUpScript to EMPTY
- set the exitLock to 0
- set CorpDemo to gCorpDemo
- set PickerPath to gPickerPath
- set CorpDemoList to gCorpDemoList
- set LastDemo to gLastDemo
- set colorDepth to gColorDepth
- set corpVolume to gCorpVolume
- set returnFrame to gReturnFrame
- clearGlobals()
- if not voidp(gReturnFrame) then
- unlaodmember()
- end if
- set gCorpDemo to CorpDemo
- set gPickerPath to PickerPath
- set gCorpDemoList to CorpDemoList
- set gLastDemo to LastDemo
- set gColorDepth to colorDepth
- set gCorpVolume to corpVolume
- set gReturnFrame to returnFrame
- puppetPalette(0)
- unPuppetAll()
- end
-
- on unPuppetAll
- repeat with i = 1 to 48
- puppetSprite(i, 0)
- end repeat
- end
-